<extend name="Public/layout"/>

<block name="header">
    <li class="active"><a href="javascript:;">安装协议</a></li>
    <li class="active"><a href="javascript:;">环境检测</a></li>
    <li class="active"><a href="javascript:;">参数设置</a></li>
    <li><a href="javascript:;">开始安装</a></li>
    <li><a href="javascript:;">完成安装</a></li>
</block>

<block name="body">
    <?php
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_HOST_M', '127.0.0.1');
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_PORT', '3306');
    ?>
    <div class="article">
        <header>
            <h1 class="text-center">参数设置</h1>
            <section class="abstract">版权所有 (c) 2014－<php>echo date("Y",time());</php>{:C('INSTALL_COMPANY_NAME')}保留所有权利。</section>
        </header>
        <section>
            <form class="form container" action="__SELF__" method="post" target="_self">
                <div class="row">
                    <div class="col-xs-12 col-sm-6">
                        <h2>数据库连接信息</h2>
                        <div class="form-group">
                            <label class="control-label">数据库连接类型</label>
                            <div class="control-group">
                                <select name="db[]" class="form-control">
                                    <option>mysql</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">数据库服务器，数据库服务器IP，一般为127.0.0.1</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_HOST_M'>{$Think.const.SAE_MYSQL_HOST_M}<else/>127.0.0.1</defined>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">数据库名</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_DB'>{$Think.const.SAE_MYSQL_DB}<else/>corethink</defined>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">数据库用户名</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_USER'>{$Think.const.SAE_MYSQL_USER}<else/>root</defined>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">数据库密码</label>
                            <div class="control-group">
                                <input class="form-control" type="password" name="db[]" value="<defined name='SAE_MYSQL_PASS'>{$Think.const.SAE_MYSQL_PASS}</defined>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">数据库端口，数据库服务连接端口，一般为3306</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_PORT'>{$Think.const.SAE_MYSQL_PORT}<else/>3306</defined>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">数据表前缀，同一个数据库运行多个系统时请修改为不同的前缀</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="db[]" value="{$Think.config.ORIGINAL_TABLE_PREFIX}">
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12 col-sm-6">
                        <h2>创始人帐号信息</h2>
                        <div class="form-group">
                            <label class="control-label">用户名</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="admin[]" value="admin">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">密码</label>
                            <div class="control-group">
                                <input class="form-control" type="password" name="admin[]" value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">确认密码</label>
                            <div class="control-group">
                                <input class="form-control" type="password" name="admin[]" value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">邮箱，请填写正确的邮箱便于收取提醒邮件</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="admin[]" value="admin@example.com">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">手机号</label>
                            <div class="control-group">
                                <input class="form-control" type="text" name="admin[]" value="">
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </section>
        <div>
            <input type="submit" class="btn btn-primary btn-block ajax-post" target-form="form" value="下一步">
            <a class="btn btn btn-block" href="{:U('Install/step1')}">上一步</a>
        </div>
    </div>    
</block>
